.class public Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;
.super Landroidx/recyclerview/widget/RecyclerView$Adapter;
.source "ClassifyGroupAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroidx/recyclerview/widget/RecyclerView$Adapter<",
        "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
        ">;"
    }
.end annotation


# instance fields
.field private a:Landroidx/recyclerview/widget/RecyclerView$Adapter;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroidx/recyclerview/widget/RecyclerView$Adapter<",
            "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;",
            ">;"
        }
    .end annotation
.end field

.field private b:Landroid/content/Context;

.field private c:Ljava/lang/String;

.field private d:Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;

.field private e:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroidx/recyclerview/widget/RecyclerView;Ljava/lang/String;Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;)V
    .locals 1
    .param p4    # Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param

    .line 1
    invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;-><init>()V

    .line 2
    invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    .line 3
    invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;

    move-result-object p2

    check-cast p2, Landroidx/recyclerview/widget/GridLayoutManager;

    .line 4
    iput-object p1, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->b:Landroid/content/Context;

    .line 5
    iput-object p3, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->c:Ljava/lang/String;

    .line 6
    iput-object p4, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->d:Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;)Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->d:Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$d;

    return-object p0
.end method


# virtual methods
.method public a(Ljava/lang/String;)V
    .locals 0

    .line 2
    iput-object p1, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->e:Ljava/lang/String;

    return-void
.end method

.method public getItemCount()I
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I

    move-result v0

    if-lez v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemCount()I

    move-result v0

    add-int/lit8 v0, v0, 0x1

    return v0

    :cond_0
    const/4 v0, 0x0

    return v0
.end method

.method public getItemViewType(I)I
    .locals 1

    if-nez p1, :cond_0

    const/4 p1, -0x1

    return p1

    .line 1
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    add-int/lit8 p1, p1, -0x1

    invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->getItemViewType(I)I

    move-result p1

    return p1
.end method

.method public onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
    .locals 2

    .line 1
    invoke-virtual {p0, p2}, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->getItemViewType(I)I

    move-result v0

    const/4 v1, -0x1

    if-ne v0, v1, :cond_0

    return-void

    .line 2
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    add-int/lit8 p2, p2, -0x1

    invoke-virtual {v0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->onBindViewHolder(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V

    return-void
.end method

.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
    .locals 6

    const/4 v0, -0x1

    if-eq p2, v0, :cond_0

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;

    invoke-virtual {v0, p1, p2}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;

    move-result-object p1

    return-object p1

    .line 2
    :cond_0
    iget-object p2, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->b:Landroid/content/Context;

    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const v0, 0x7f0c02f1

    const/4 v1, 0x0

    invoke-virtual {p2, v0, p1, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    const p2, 0x7f0906cb

    .line 3
    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/LinearLayout;

    const v0, 0x7f0903ff

    .line 4
    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/ui/topclassify/ExpandableLayout;

    const v2, 0x7f0905d6

    .line 5
    invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    const v3, 0x7f090cad

    .line 6
    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 7
    invoke-virtual {v0, v2}, Lcom/estrongs/android/ui/topclassify/ExpandableLayout;->setSwitcher(Landroid/view/View;)V

    .line 8
    iget-object v2, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->b:Landroid/content/Context;

    check-cast v2, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-virtual {v2}, Lcom/estrongs/android/pop/view/FileExplorerActivity;->Y()Lcom/estrongs/android/ui/topclassify/f;

    move-result-object v2

    iget-object v4, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->c:Ljava/lang/String;

    invoke-virtual {v2, v4}, Lcom/estrongs/android/ui/topclassify/f;->b(Ljava/lang/String;)Lcom/estrongs/android/ui/topclassify/c;

    move-result-object v2

    if-eqz v2, :cond_4

    .line 9
    invoke-virtual {v2}, Lcom/estrongs/android/ui/topclassify/c;->d()Ljava/util/List;

    move-result-object v4

    .line 10
    invoke-virtual {v0, v4}, Lcom/estrongs/android/ui/topclassify/ExpandableLayout;->setShowViews(Ljava/util/List;)V

    .line 11
    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    const/4 v5, 0x2

    if-gt v4, v5, :cond_1

    const/16 v4, 0x8

    .line 12
    invoke-virtual {p2, v4}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0

    .line 13
    :cond_1
    invoke-virtual {p2, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 14
    :goto_0
    new-instance v4, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$a;

    invoke-direct {v4, p0, v0}, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$a;-><init>(Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;Lcom/estrongs/android/ui/topclassify/ExpandableLayout;)V

    invoke-virtual {p2, v4}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const p2, 0x7f09021e

    .line 15
    invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    invoke-virtual {p2, v1}, Landroid/view/View;->setVisibility(I)V

    .line 16
    invoke-virtual {v2}, Lcom/estrongs/android/ui/topclassify/c;->g()Z

    move-result p2

    const/4 v0, 0x0

    if-eqz p2, :cond_2

    const/4 p2, 0x1

    .line 17
    invoke-virtual {v3, p2}, Landroid/widget/TextView;->setEnabled(Z)V

    const/high16 p2, 0x40a00000    # 5.0f

    .line 18
    invoke-static {p2}, Lcom/estrongs/android/pop/utils/t;->a(F)I

    move-result p2

    invoke-virtual {v3, p2}, Landroid/widget/TextView;->setCompoundDrawablePadding(I)V

    .line 19
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object p2

    const v4, 0x7f0805d0

    const v5, 0x7f060330

    invoke-virtual {p2, v4, v5}, Lcom/estrongs/android/ui/theme/b;->b(II)Landroid/graphics/drawable/Drawable;

    move-result-object p2

    .line 20
    invoke-virtual {v3, v0, v0, p2, v0}, Landroid/widget/TextView;->setCompoundDrawablesWithIntrinsicBounds(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    goto :goto_1

    .line 21
    :cond_2
    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setEnabled(Z)V

    .line 22
    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setCompoundDrawablePadding(I)V

    .line 23
    invoke-virtual {v3, v0, v0, v0, v0}, Landroid/widget/TextView;->setCompoundDrawables(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 24
    :goto_1
    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 25
    iget-object p2, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->e:Ljava/lang/String;

    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p2

    if-eqz p2, :cond_3

    invoke-virtual {v2}, Lcom/estrongs/android/ui/topclassify/c;->c()Ljava/lang/String;

    move-result-object p2

    goto :goto_2

    :cond_3
    iget-object p2, p0, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;->e:Ljava/lang/String;

    :goto_2
    invoke-virtual {v3, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 26
    new-instance p2, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$b;

    invoke-direct {p2, p0}, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$b;-><init>(Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;)V

    invoke-virtual {v3, p2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 27
    :cond_4
    new-instance p2, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$c;

    invoke-direct {p2, p0, p1}, Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter$c;-><init>(Lcom/estrongs/android/ui/recycler/ClassifyGroupAdapter;Landroid/view/View;)V

    return-object p2
.end method
